<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c" %>    
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="f" %>  
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Amaze UI Admin index Examples</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="lib/amazeui/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="lib/amazeui/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <!-- cssjs -->
    <jsp:include page="/WEB-INF/page/bgo_layout/cssjs.jsp" />
</head>

<body data-type="widgets">
    <script src="lib/amazeui/assets/js/theme.js"></script>
    <div class="am-g tpl-g">
        <!-- 头部 -->
         <jsp:include page="/WEB-INF/page/bgo_layout/head.jsp" />
        <!-- 侧边导航栏 -->
         <jsp:include page="/WEB-INF/page/bgo_layout/left.jsp" />
        <!-- 内容区域 -->
        <div class="tpl-content-wrapper">
            <div class="row-content am-cf">
                <div class="row">
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                        <div class="widget am-cf">
                            <div class="widget-head am-cf">
                                <div class="widget-title  am-cf">review列表</div>


                            </div>
                            <div class="widget-body  am-fr">

                                <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                                    <div class="am-form-group">
                                        <div class="am-btn-toolbar">
                                            <div class="am-btn-group am-btn-group-xs">
                                             <!-- <a href="reviewAction_saveOrUpdatePage_review.hp"><button type="button" class="am-btn am-btn-default am-btn-success"><span class="am-icon-plus"></span> 新增</button></a> -->
                                           
                                           <a  href="reviewAction_saveOrUpdatePage_review.hp" type="button" class="am-btn am-btn-default am-btn-success"><span class="am-icon-plus"></span> 新增</a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="am-u-sm-12 am-u-md-6 am-u-lg-3">
                                    <div class="am-form-group tpl-table-list-select">
                                        <select data-am-selected="{btnSize: 'sm'}">
              <option value="option1">所有类别</option>
              <option value="option2">IT业界</option>
              <option value="option3">数码产品</option>
              <option value="option3">笔记本电脑</option>
              <option value="option3">平板电脑</option>
              <option value="option3">只能手机</option>
              <option value="option3">超极本</option>
            </select>
                                    </div>
                                </div>
                                <div class="am-u-sm-12 am-u-md-12 am-u-lg-3">
                                    <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
                                        <input type="text" class="am-form-field ">
                                        <span class="am-input-group-btn">
            <button class="am-btn  am-btn-default am-btn-success tpl-table-list-field am-icon-search" type="button">
            </button>
          </span>
                                    </div>
                                </div>

                                <div class="am-u-sm-12">
                                    <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black " id="example-r">
                                        <thead>
                                            <tr>
                                                <th>编号</th>
                                                <th>留言人</th>
                                                <th>对应house标题</th>
                                                <th>留言时间</th>
                                                <th>状态</th>
                                                <th>操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                       <c:forEach items="${page.list}" var="item" varStatus="stats">
                                            <tr class="gradeX">
                                                <td>${stats.count}</td>
                                                <td>${item.user.name}</td>
                                                <td>${item.house.title}</td>
                                                <td><f:formatDate pattern="yyyy-MM-dd" value="${item.date }" /></td>
                                                <td>
                                                ${itrm.state_id }
                                                </td>
                                                <td>
                                                    <div class="tpl-table-black-operation">
                                                        <a href="reviewAction_saveOrUpdatePage_review.hp?id=${item.id}">
                                                            <i class="am-icon-pencil"></i> 编辑
                                                        </a>
                                                        <a href="reviewAction_delete_review.hp?id=${item.id}" class="tpl-table-black-operation-del">
                                                            <i class="am-icon-trash"></i> 删除
                                                        </a>
                                                    </div>
                                                </td>
                                            </tr>
                                            </c:forEach>
                                            <!-- more data -->
                                        </tbody>
                                    </table>
                                </div>
                                <div class="am-u-lg-12 am-cf">
                                <div  class="am-fl" style="margin: 1.5rem 0;">
                                <span>当前页/总页数  ${page.pageNum}/${page.pages}</span>
                                </div>
                                     <!-- 分页位标-->
                                    <div class="am-fr">
                                        <ul class="am-pagination tpl-pagination">
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    </div>

 <jsp:include page="/WEB-INF/page/bgo_layout/foot.jsp" />
   <script type="text/javascript">
   
   // 初始化 分页组件
  var pagination = new Pagination({
  	  wrap: $('.am-pagination'), // 存放分页内容的容器
  	  count: parseInt('${page.pages}'), // 总页数
  	  current: parseInt('${page.pageNum}'), // 当前的页数（默认为1）
  	  prevText: '上一页', // prev 按钮的文本内容
  	  nextText: '下一页', // next 按钮的文本内容
  	  callback: function(pageNum) { // 每一个页数按钮的回调事件
  		  location.href='reviewAction_list_review.hp?pageNum='+pageNum;
  		  /*  alert(pageNum) */
  	  }
  	});
  
   </script>


</body>

</html>